﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="view_sub_comment.ascx.cs" Inherits="vboard_component_board_template_default_view_sub_comment" %>

<div class="view_sub_comment">

	<asp:UpdatePanel ID="CommentListUpdatePanel" runat="server" UpdateMode="Conditional">
		<ContentTemplate>
			<!-- 댓글 목록 시작 //-->
			<asp:Repeater ID="CommentRepeater" runat="server" OnItemDataBound="CommentRepeater_ItemDataBound" OnItemCommand="CommentRepeater_ItemCommand">
				<ItemTemplate>
					<div class="CommonBox">
						<div class="Content">
							<div class="Image"><asp:Literal ID="CommentListUserImageLiteral" runat="server" /></div>
							<div class="Info">
								<div>
									<span class="Name"><%# Eval("UserName") %></span>
									<span class="DateTime"><asp:Literal ID="DetailInfoLiteral" runat="server" /></span>
								</div>
								<div class="Update">
									<asp:Literal ID="UpdateInfoLiteral" runat="server" />
								</div>
								<div class="CommentContent" id="_<%# Eval("CommentID") %>"><asp:Literal ID="ContentLiteral" runat="server" /></div>
								<asp:Panel ID="AdminButtonPanel" runat="server" CssClass="AdminButtonPanel">
									<asp:Button ID="BlockButton" runat="server" CausesValidation="false" CommandName="SetBlock" Text="<%$ Resources:Button_Block_Text %>" />
									<asp:Button ID="ClearButton" runat="server" CausesValidation="false" CommandName="SetClear"	Text="<%$ Resources:Button_Clear_Text %>" />
								</asp:Panel>
								<div class="LeftButton">
									<asp:ImageButton ID="ModifyButton" runat="server" CommandName="Edit" ImageUrl="<%$ Resources:Button_Modify_ImageUrl %>" AlternateText="<%$ Resources:Button_Modify_Text %>" ImageAlign="Top" />
									<asp:ImageButton ID="DeleteButton" runat="server" CommandName="Delete" OnClientClick="<%$ Resources:VGlobalResources, General_Script_RemoveConfirm %>" ImageUrl="<%$ Resources:Button_Remove_ImageUrl %>" AlternateText="<%$ Resources:Button_Remove_Text %>" ImageAlign="Top" />
								</div>
							</div>
							<div class="Clear"></div>
						</div>
					</div>
				</ItemTemplate>
			</asp:Repeater>
			<!-- 댓글 목록 끝 //-->

			<!-- 댓글 편집 폼 시작 //-->
			<div id="CommentEditFormPanel" class="VWebGlobal_MessagePanel">
				<div>댓글편집</div>
				<div><asp:TextBox ID="CommentEditFormTextBox" runat="server" TextMode="MultiLine" Rows="5" Width="98%" /></div>
				<div><asp:CheckBox ID="CommentEditFormIsHtml" runat="server" Text="Html" /></div>
				<div>
					<asp:HiddenField ID="CommentEditFormCommentID" runat="server" />
					<asp:ImageButton ID="CommentEditSubmit" runat="server" ImageUrl="<%$ Resources:Button_OK_ImageUrl %>" AlternateText="<%$ Resources:Button_OK_Text %>" OnClick="UpdateCommentButton_Click" />
					<asp:ImageButton ID="CommentEditCancelButton" runat="server" ImageUrl="<%$ Resources:Button_Cancel_ImageUrl %>" AlternateText="<%$ Resources:Button_Cancel_Text %>" OnClientClick="Comment_Cancel();return false;" />
				</div>
			</div>
			<!-- 댓글 편집 폼 끝 //-->

			<asp:UpdateProgress ID="CommentListUpdatePanelProgress" runat="server" AssociatedUpdatePanelID="CommentListUpdatePanel" DisplayAfter="0">
				<ProgressTemplate>
					<div class="VWebGlobal_UpdateProgressPanel"><asp:Image ID="LoaderImage1" runat="server" ImageUrl="~/vboard/common/image/loader.gif" /> <%= VUtility.GetVWebGlobalResource("General_UpdateProgressMessage") %></div>
				</ProgressTemplate>
			</asp:UpdateProgress>
		</ContentTemplate>
		<Triggers>
			<asp:AsyncPostBackTrigger ControlID="CommentSubmitButton" EventName="Click" />
			<asp:AsyncPostBackTrigger ControlID="CommentEditSubmit" EventName="Click" />
		</Triggers>
	</asp:UpdatePanel>

	<!-- 댓글 쓰기폼 시작 //-->
	<asp:Panel ID="CommentWriteFormPanel" runat="server" EnableViewState="false" DefaultButton="CommentSubmitButton" CssClass="CommonBox">
		<div class="Header"><%= GetLocalResourceObject("CommentForm_Title_Text").ToString() %></div>
		<div class="Content">
			<asp:TextBox ID="CommentContentTextBox" runat="server" TextMode="MultiLine" Rows="5" CssClass="VWebGlobal_TextBox" Width="98%" />
			<asp:RequiredFieldValidator ID="CommentContentTextBoxRequiredFieldValidator" runat="server"
				ControlToValidate="CommentContentTextBox" Display="None" ValidationGroup="CommentForm" SetFocusOnError="true"
				ErrorMessage="<%$ Resources:VGlobalResources, Board_Validate_CommentContent_Insert %>" />
			<ajaxToolkit:ValidatorCalloutExtender ID="CommentContentTextBoxRequiredFieldValidatorCalloutExtender" runat="Server"
				TargetControlID="CommentContentTextBoxRequiredFieldValidator" CssClass="VWebGlobal_ValidatorcalloutNone" Width="250px"
				HighlightCssClass="VWebGlobal_ValidatorcalloutTargetHighlight" />
			<div><asp:CheckBox ID="CommentIsHTMLCheckBox" runat="server" Text="HTML" /></div>
			<div>
				<asp:ImageButton ID="CommentSubmitButton" runat="server" ValidationGroup="CommentForm" OnClick="AddCommentButton_Click" ImageUrl="<%$ Resources:Button_OK_ImageUrl %>" AlternateText="<%$ Resources:Button_OK_Text %>" />
			</div>
		</div>
	</asp:Panel>
	<!-- 댓글 쓰기폼 끝 //-->

</div>